package main
import (
	"fmt"
	
	"os"
	"os/exec"
)

// Define the Type enum
const (
	TypeBooleanField = 1 << iota
	TypeVarCharField
	TypeCharField
	TypeTextField
	TypeTimeField
	TypeDateField
	TypeDateTimeField
	TypeBitField
	TypeSmallIntegerField
	TypeIntegerField
	TypeBigIntegerField
	TypePositiveBitField
	TypePositiveSmallIntegerField
	TypePositiveIntegerField
	TypePositiveBigIntegerField
	TypeFloatField
	TypeDecimalField
	TypeJSONField
	TypeJsonbField
	RelForeignKey
	RelOneToOne
	RelManyToMany
	RelReverseOne
	RelReverseMany
)


// Define some logic enum 8388607
const (
	IsIntegerField         = ^-TypePositiveBigIntegerField >> 6 << 7
	IsPositiveIntegerField = ^-TypePositiveBigIntegerField >> 10 << 11
	IsRelField             = ^-RelReverseMany  >> 18 << 19
	IsFieldType            = ^-RelReverseMany<<1 + 1
)

func main() {
	cmd := exec.Command("cmd","/c","cls")
	cmd.Stdout = os.Stdout
	cmd.Run()

	fmt.Println(" 开始 ")
	mForA: 
	for i := 0; i < 10; i++ {
		if i == 5{
			fmt.Println(">>>>>>>> ",i)
			break mForA // 跳出循环
		}
		if i == 3 {
			continue  //
		}
			
		fmt.Println(" <------- ",i)
	}
	
	fmt.Println(" 结束 ")

	
	fmt.Println(" TypeA ",TypeBooleanField)
	fmt.Println(" TypeB ",TypeVarCharField)
	fmt.Println(" TypeC ",TypeCharField)
	fmt.Println(" TypeD ",RelReverseMany)

	fmt.Println(" IsA ",IsIntegerField)
	fmt.Println(" IsB ",IsPositiveIntegerField)

	fmt.Println(" IsA ",IsRelField)
	fmt.Println(" IsB ",IsFieldType)
}